package com.example.questionnaire.pojo.DO;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;


@Data
@ApiModel("用户类")
public class User {

    @TableId(type = IdType.UUID)
    @ApiModelProperty("id")
    private String id;

    @ApiModelProperty("用户id")
    private String openId;

    @ApiModelProperty("问卷id")
    private String formid;

    @ApiModelProperty("手机号")
    private String phone;

    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("会话秘钥")
    private String sessionKey;

    @ApiModelProperty("登录态")
    private String token;
    @ApiModelProperty("问卷状态")
    private String status;
    @ApiModelProperty("问卷数量")
    private String AnswerNumber;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)//在插入的时候自动填充
    private Date createTime;
    @ApiModelProperty("最后更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)////在插入和更新的时候自动填充
    private Date modifiedTime;
    @ApiModelProperty("逻辑删除")
    @TableLogic
    private Integer deleted;

    public User(String formid, String token, String status, String answerNumber) {
        this.formid = formid;
        this.token = token;
        this.status = status;
        AnswerNumber = answerNumber;
    }

    public User() {
    }
}
